[SUBROUTINE]
version = 1.14
icon = corner-radius.png
name = _("Radius OD")
type = radius_od
help = _("<b>Create external radius using compensation.</b>&#10;Cutter orientation should be 1, 2, 9 or None")
order = act h1 x z hp r d hf fin

[PARAM_ACT]
name = _("Active")
icon = enable.png
type = bool
value = 1

[PARAM_H1]
name = _("Crest")
type = sub-header
tool_tip = _("Where you want it rounded")

[PARAM_X]
name = _("Diameter")
type = float
icon = x.png
value = 1.0
metric_value = 25.0
minimum_value = 0.0
not_allowed = 0
header = h1

[PARAM_Z]
name = _("Z")
type = float
icon = z.png
value = 0
metric_value = 0.0
header = h1

[PARAM_HP]
name = _("Params")
type = sub-header

[PARAM_R]
name = _("Radius")
icon = corner-radius.png
type = float
value = 0.25
metric_value = 6.0
minimum_value = 0.0
not_allowed = 0
header = hp

[PARAM_D]
name = _("Direction")
type = combo
options = _("X- to Z-=0:Z+ to X-=1:Z- to X-=2:X- to Z+=3")
icon = dir.png
tool_tip = _("Choose from Begin to End")
value = 0
header = hp

[PARAM_HF]
name = _("Finishing")
type = sub-header

[PARAM_FIN]
name = _("Number of passes")
icon = finish.png
type = int
value = 1
minimum_value = 0
tool_tip = _("Or spring passes")
header = hf


[VALIDATION]
content =
	if #param_act == 1 :
		if (#param_d in [0, 2]) and TOOL_TABLE.get_tool_orient() not in [0, 2, 9] :
			self.msg_inv(_('Cutter orientation should be 2, 9 or 0'), 2)
		elif (#param_d in [1, 3]) and TOOL_TABLE.get_tool_orient() not in [0, 1, 9] :
			self.msg_inv(_('Cutter orientation should be 1, 9 or 0'), 2)


[CALL]
content =
	(begin #sub_name)
	(author : Fernand Veilleux)
	
	o<#self_id_act> if [#param_act]
		o<radius_od> CALL [#param_x] [#param_z] [#param_r] [#param_d] [#param_fin]
	o<#self_id_act> endif
	
	(end #sub_name)
